<%-- 
    Document   : view_pendidikan
    Created on : Jan 14, 2014, 10:20:30 PM
    Author     : Muhammad Dony
--%>

<%@page import="java.util.List"%>
<%@page import="data.PendidikanData"%>
<%@page import="database.PendidikanDB"%>
<%@include file="../header_user.jsp" %>
         <ul class="nav nav-tabs">
            <li><a href="./identitas">Identitas</a></li>
            <li><a href="./pendidikan">Riwayat Pendidikan</a></li>
            <li><a href="./organisasi">Riwayat Organisasi</a></li>
            <li><a href="./panitia">Riwayat Kepanitian</a></li>
            <li><a href="./prestasi">Prestasi</a></li>
            <li><a href="./keahlian">Keahlian</a></li>
        </ul>
<% //userdata user = (userdata) session.getAttribute("adminMasuk"); %>
<script src="res/js/jquery.dataTables.js"></script>
<script src="res/js/bootstrap.dataTables.js"></script>
<link href="res/css/dataTables.css" type="text/css"/>
<style>.pagination{margin:0}</style>
<div class="row">
    <div class="col-lg-6 col-lg-push-1">
        <a href="./pendidikan?action=add" class="btn btn-success"><i class="glyphicon glyphicon-plus"></i> Tambah Riwayat Pendidikan</a>
        
        <table id="table" cellpadding="0" cellspacing="0" border="0" class="table table-striped table-bordered">
            <thead>
            <tbody>
            <th>No</th>
            <th>Institusi</th>
            <th>Jurusan</th>
            <th>Tahun Masuk</th>
            <th>Tahun Tamat</th>
            <th>Action</th>
            </thead>
            <tbody>
                <%
                    List listpendidikan = (List) request.getAttribute("listpendidikan");
                    int n = 1;                  
                %>
                <% for (int i = 0; i < listpendidikan.size(); i++) {
                        PendidikanData data1 = (PendidikanData) listpendidikan.get(i);

                %>
                <tr>
                    <td><%=n++%></td>
                    <td><%= data1.getInstitusi()%></td>
                    <td><%=data1.getJurusan()%></td>
                    <td></i><%=data1.getMasuk()%></td>
                    <td></i><%=data1.getTamat()%></td>
                    <td>
                        <a href="./pendidikan?action=edit&id=<%=data1.getID()%>&no=<%= data1.getNomor()%>" class="btn btn-primary">
                            <i class="glyphicon glyphicon-pencil"></i> Edit
                        </a> 
                        <a href="./pendidikan?action=delete&id=<%=data1.getID()%>&no=<%= data1.getNomor()%>" class="btn btn-danger">
                            <i class="glyphicon glyphicon-trash"></i> Delete
                        </a>
                    </td>  
                </tr>
                <% }%>
            </tbody>
        </table>
    </div>
</div>
<%@include file="../footer_user.jsp" %>
